tywx.AdManager = {
    retryCrossTimes: 3,
    retryBannerTimes: 3,
    retryNewAdTimes: 3,
    iconTimer: 0,
    bannerTimer: 0,
    newIconTimer: 0,
    AnimType: {
        STATIC: 1,
        SHAKE: 2,
        FRAME: 3
    },
    adNodeList: [],
    bannerNodeList: [],
    newAdNodeList: [],
    newAdPointInfoList: [],
    allAdInfoList: [],
    allBannerInfoList: [],
    allNewAdInfoDict: {},
    rawAdInfoList: void 0,
    rawBannerInfoList: void 0,
    rawNewAdInfoDict: void 0,
    showAd: function(t, e) {
        var n = new tywx.AdManager.adNodeClass();
        n.adInfoList = JSON.parse(JSON.stringify(tywx.AdManager.allAdInfoList)), n.adType = 1, 
        n.adTag = e || "", void 0 == t && (t = {
            x: 0,
            y: 0
        }), n.createAdNode(t), tywx.AdManager.adNodeList.push(n);
    },
    showAd2: function(t, e) {
        var n = new tywx.AdManager.adNodeClass();
        return n.adInfoList = JSON.parse(JSON.stringify(tywx.AdManager.allAdInfoList)), 
        n.adType = 1, n.adTag = e || "", void 0 == t && (t = {
            x: 0,
            y: 0
        }), n.genRandomFirstAdInfo(), n.currentAdInfo && n.currentAdInfo.icon_url ? (tywx.AdManager.adNodeList.push(n), 
        "string" == typeof n.currentAdInfo.icon_url ? n.currentAdInfo.icon_url : n.currentAdInfo.icon_url[0]) : null;
    },
    showBanner: function(t, e) {
        var n = new tywx.AdManager.adNodeClass();
        n.adInfoList = JSON.parse(JSON.stringify(tywx.AdManager.allBannerInfoList)), n.adType = 2, 
        n.adTag = e || "", void 0 == t && (t = {
            x: 0,
            y: 0
        }), n.createAdNode(t), tywx.AdManager.bannerNodeList.push(n);
    },
    showNewAd: function(t, e, n) {
        var r = new tywx.AdManager.adNodeClass();
        void 0 != e && ("string" == typeof e && void 0 != tywx.AdManager.allNewAdInfoDict[e] ? (r.adInfoList = JSON.parse(JSON.stringify(tywx.AdManager.allNewAdInfoDict[e])), 
        tywx.AdManager.newAdPointInfoList = r.adInfoList, r.adType = 3, r.adTag = n || "", 
        void 0 == t && (t = {
            x: 0,
            y: 0
        }), r.createAdNode(t), tywx.AdManager.newAdNodeList.push(r)) : console.error("This PointName Does Not Exist!Please Check!"));
    },
    showNewAd2: function(t, e, n) {
        var r = new tywx.AdManager.adNodeClass();
        if (void 0 != e) {
            if ("string" == typeof e && void 0 != tywx.AdManager.allNewAdInfoDict[e]) return r.adInfoList = JSON.parse(JSON.stringify(tywx.AdManager.allNewAdInfoDict[e])), 
            tywx.AdManager.newAdPointInfoList = r.adInfoList, r.adType = 3, r.adTag = n || "", 
            void 0 == t && (t = {
                x: 0,
                y: 0
            }), tywx.AdManager.adNodeList.push(r), "string" == typeof r.currentAdInfo.icon_url ? r.currentAdInfo.icon_url : r.currentAdInfo.icon_url[0];
            console.error("This PointName Does Not Exist!Please Check!");
        }
    },
    getAdNodeList: function() {
        return this.adNodeList;
    },
    getAdNodeByTag: function(t) {
        if (!t) return null;
        for (var e in this.adNodeList) if (this.adNodeList[e].adTag.toString() == t.toString()) return this.adNodeList[e];
        return null;
    },
    getBannerNodeList: function() {
        return this.bannerNodeList;
    },
    getBannerNodeByTag: function(t) {
        if (!t) return null;
        for (var e in this.bannerNodeList) if (this.bannerNodeList[e].adTag.toString() == t.toString()) return this.bannerNodeList[e];
        return null;
    },
    getNewAdNodeList: function() {
        return this.newAdNodeList;
    },
    getNewAdNodeByTag: function(t) {
        if (!t) return null;
        for (var e in this.newAdNodeList) if (this.newAdNodeList[e].adTag.toString() == t.toString()) return this.newAdNodeList[e];
        return null;
    },
    getAdInfoList: function() {
        return this.allAdInfoList;
    },
    getBannerInfoList: function() {
        return this.allBannerInfoList;
    },
    getNewAdInfoDict: function() {
        return this.allNewAdInfoDict;
    },
    adNodeClass: function() {
        this.adType = 0, this.adIconBtn = null, this.currentAdInfo = null, this.currentWebPage = null, 
        this.adInfoList = [], this.adTag = "";
    },
    adNodeObj: {
        createAdNode: function(t) {
            if (this.genRandomFirstAdInfo(), this.currentAdInfo) if (this.adIconBtn) this.adIconBtn.active = !0; else {
                var e = this;
                cc.loader.loadRes("prefabs/adNode", function(n, r) {
                    var i = cc.instantiate(r), o = t || {
                        x: 0,
                        y: 0
                    };
                    i.position = cc.p(o.x, o.y), e.adIconBtn = i, cc.game.addPersistRootNode(i), e.adIconNode(), 
                    e.adIconBtn.getChildByName("adButton").on("click", function() {
                        e.onClickAdIconBtn();
                    });
                });
            }
        },
        genRandomFirstAdInfo: function() {
            var t = this;
            if (0 != this.adInfoList.length) {
                var e = [ {
                    weight: 0,
                    id: "000"
                } ];
                for (var n in this.adInfoList) {
                    var r = {
                        weight: parseInt(t.adInfoList[n].icon_weight),
                        id: t.adInfoList[n].icon_id
                    };
                    e.push(r);
                }
                e.sort(function(t, e) {
                    return t.weight > e.weight;
                });
                var i = 0;
                e.forEach(function(t) {
                    i += t.weight;
                });
                for (var o = parseInt(1e4 * Math.random()) % (i + 1), a = 0, s = 0, n = 0; n < e.length - 1; n++) if ((a += e[n].weight) < o && a + e[n + 1].weight >= o) {
                    s = n + 1;
                    break;
                }
                var c = e[s];
                this.adInfoList.forEach(function(e) {
                    e.icon_id == c.id && (t.currentAdInfo = e);
                });
            }
        },
        genRandomSecondAdInfo: function() {
            var t = this, e = this.currentAdInfo.webpages;
            if (void 0 !== e && 0 != e.length) {
                var n = [ {
                    weight: 0,
                    id: "000"
                } ];
                for (var r in e) {
                    var i = {
                        weight: parseInt(e[r].webpage_weight),
                        id: e[r].config_id
                    };
                    n.push(i);
                }
                n.sort(function(t, e) {
                    return t.weight > e.weight;
                });
                var o = 0;
                n.forEach(function(t) {
                    o += t.weight;
                });
                for (var a = parseInt(1e4 * Math.random()) % (o + 1), s = 0, c = 0, r = 0; r < n.length - 1; r++) if ((s += n[r].weight) < a && s + n[r + 1].weight >= a) {
                    c = r + 1;
                    break;
                }
                var d = n[c];
                e.forEach(function(e) {
                    e.config_id == d.id && (t.currentWebPage = e);
                });
            }
        },
        adIconNode: function() {
            if (this.currentAdInfo && this.adIconBtn) {
                var t = this.currentAdInfo.icon_type, e = this, n = this.adIconBtn.getChildByName("adIcon"), r = this.adIconBtn.getChildByName("adButton");
                switch (n.stopAllActions(), n.removeComponent(cc.Animation), n.setRotation(0), t) {
                  case tywx.AdManager.AnimType.STATIC:
                    cc.loader.load({
                        url: e.currentAdInfo.icon_url[0]
                    }, function(t, e) {
                        t || (n.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(e), e && e.width && e.height && (n.setContentSize(cc.size(e.width, e.height)), 
                        r.setContentSize(cc.size(e.width, e.height))));
                    });
                    break;

                  case tywx.AdManager.AnimType.SHAKE:
                    cc.loader.load({
                        url: e.currentAdInfo.icon_url[0]
                    }, function(t, e) {
                        n.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(e), e && e.width && e.height && (n.setContentSize(cc.size(e.width, e.height)), 
                        r.setContentSize(cc.size(e.width, e.height))), n.anchorX = .5, n.anchorY = .5;
                        var i = cc.rotateBy(.06, -20), o = cc.rotateBy(.12, 40), a = cc.rotateBy(.12, -40), s = cc.rotateBy(.06, 20), c = cc.delayTime(1);
                        n.runAction(cc.repeatForever(cc.sequence(i, cc.repeat(cc.sequence(o, a), 2), s, c)));
                    });
                    break;

                  case tywx.AdManager.AnimType.FRAME:
                    var i = [], o = function() {
                        n.stopAllActions(), n.removeComponent(cc.Animation);
                        var t = i[0].getTexture();
                        t && t.width && t.height && (n.setContentSize(cc.size(t.width, t.height)), r.setContentSize(cc.size(t.width, t.height)));
                        var o = e.currentAdInfo.time_interval, a = o && o > 0 ? 1e3 / o : 10, s = n.addComponent(cc.Animation), c = cc.AnimationClip.createWithSpriteFrames(i, a);
                        c.name = "anim_frame", c.wrapMode = cc.WrapMode.Loop, s.addClip(c), s.play("anim_frame");
                    };
                    cc.loader.load(e.currentAdInfo.icon_url, function(t, n) {
                        if (t) for (r = 0; r < t.length; r++) cc.log("Error url [" + t[r] + "]: " + n.getError(t[r]));
                        for (var r = 0; r < e.currentAdInfo.icon_url.length; r++) if (n.getContent(e.currentAdInfo.icon_url[r])) {
                            var a = new cc.SpriteFrame(n.getContent(e.currentAdInfo.icon_url[r]));
                            i.push(a);
                        }
                        o();
                    });
                }
            }
        },
        onClickAdIconBtn: function() {
            try {
                this.genRandomSecondAdInfo();
                var t = this.currentAdInfo.icon_skip_type, e = this.currentAdInfo.toappid, n = this.currentAdInfo.togame, r = this.currentAdInfo.path, i = this.currentAdInfo.second_toappid;
                console.log("topath ====>" + r);
                var o = this, a = this.currentAdInfo.icon_id, s = "0", c = "", d = "0";
                !this.currentWebPage || 1 != this.adType && 3 != this.adType || (c = this.currentWebPage.webpage_url, 
                s = this.currentWebPage.config_id, d = this.currentWebPage.webpage_id);
                var f = [ a, s, c, e, n, d, o.adType ];
                if (console.log("bi_paramlist ====> " + JSON.stringify(f)), tywx.BiLog.clickStat(tywx.clickStatEventType.clickStatEventTypeClickAdBtn, f), 
                wx && wx.navigateToMiniProgram) return 1 == t ? void wx.navigateToMiniProgram({
                    appId: e,
                    path: r || "?from=adcross",
                    envVersion: "release",
                    extraData: {
                        from: r || "?from=adcross"
                    },
                    success: function(t) {
                        tywx.BiLog.clickStat(tywx.clickStatEventType.clickStatEventTypeClickDirectToMiniGameSuccess, f), 
                        console.log("wx.navigateToMiniProgram success 1"), console.log(t);
                    },
                    fail: function(t) {
                        tywx.BiLog.clickStat(tywx.clickStatEventType.clickStatEventTypeClickDirectToMiniGameFail, f), 
                        console.log("wx.navigateToMiniProgram fail 1"), console.log(t);
                    },
                    complete: function(t) {
                        console.log("navigateToMiniProgram ==== complete 1"), o.resetBtnIcon2();
                    }
                }) : void (2 == t ? wx.navigateToMiniProgram({
                    appId: i,
                    path: r || "?from=adcross",
                    envVersion: "release",
                    extraData: {
                        from: r || "?from=adcross"
                    },
                    success: function(t) {
                        tywx.BiLog.clickStat(tywx.clickStatEventType.clickStatEventTypeClickDirectToMiniGameSuccess, f), 
                        console.log("wx.navigateToMiniProgram success 2"), console.log(t);
                    },
                    fail: function(t) {
                        tywx.BiLog.clickStat(tywx.clickStatEventType.clickStatEventTypeClickDirectToMiniGameFail, f), 
                        console.log("wx.navigateToMiniProgram fail 2"), console.log(t);
                    },
                    complete: function(t) {
                        o.resetBtnIcon2(), console.log("navigateToMiniProgram ==== complete 2");
                    }
                }) : console.error("Unsupported skip type! Please Check!"));
                if (!o.currentWebPage || !o.currentWebPage.webpage_url) return void o.resetBtnIcon2();
                tywx.BiLog.clickStat(tywx.clickStatEventType.clickStatEventTypeClickShowQRCode, f), 
                tywx.IsWechatPlatform() && wx.previewImage({
                    current: [ o.currentWebPage.webpage_url ],
                    urls: [ o.currentWebPage.webpage_url ],
                    success: function(t) {
                        tywx.LOGD(null, "预览图片成功！");
                    },
                    fail: function(t) {
                        tywx.LOGD(null, "预览图片失败！");
                    },
                    complete: function(t) {
                        console.log("预览图片完成"), o.resetBtnIcon2();
                    }
                });
            } catch (t) {
                console.log("error:", "tywx.AdManager.onClickAdIconBtn——" + JSON.stringify(t));
            }
        },
        resetBtnIcon: function() {
            this.adIconBtn && (this.genRandomFirstAdInfo(), this.adIconNode());
        },
        resetBtnIcon2: function() {
            this.genRandomFirstAdInfo();
        },
        onForeGround: function() {
            this.adIconNode();
        },
        showAdNode: function() {
            this.adIconBtn && (this.adIconBtn.active = !0);
        },
        hideAdNode: function() {
            this.adIconBtn && (this.adIconBtn.active = !1);
        }
    },
    freshAdIconByTime: function() {
        tywx.AdManager.adNodeList.forEach(function(t) {
            t && t.resetBtnIcon && t.resetBtnIcon();
        });
    },
    freshAdBannerByTime: function() {
        tywx.AdManager.bannerNodeList.forEach(function(t) {
            t && t.resetBtnIcon && t.resetBtnIcon();
        });
    },
    freshNewAdIconByTime: function() {
        tywx.AdManager.newAdNodeList.forEach(function(t) {
            t && t.resetBtnIcon && t.resetBtnIcon();
        });
    },
    startFreshAdIcon: function() {
        try {
            var t = 10;
            if (this.allAdInfoList && this.allAdInfoList.length && this.allAdInfoList.length > 0) for (r = 0; r < this.allAdInfoList.length; r++) if (i = this.allAdInfoList[r].icon_interval) {
                t = parseInt(i) > 0 ? parseInt(i) : t;
                break;
            }
            tywx.AdManager.iconTimer && (clearInterval(tywx.AdManager.iconTimer), tywx.AdManager.iconTimer = 0), 
            tywx.AdManager.iconTimer = setInterval(tywx.AdManager.freshAdIconByTime, 1e3 * t);
            var e = 10;
            if (this.allBannerInfoList && this.allBannerInfoList.length && this.allBannerInfoList.length > 0) for (r = 0; r < this.allBannerInfoList.length; r++) if (i = this.allBannerInfoList[r].icon_interval) {
                e = parseInt(i) > 0 ? parseInt(i) : e;
                break;
            }
            tywx.AdManager.bannerTimer && (clearInterval(tywx.AdManager.bannerTimer), tywx.AdManager.bannerTimer = 0), 
            tywx.AdManager.bannerTimer = setInterval(tywx.AdManager.freshAdBannerByTime, 1e3 * e);
            var n = 10;
            if (this.newAdPointInfoList && this.newAdPointInfoList.length && this.newAdPointInfoList.length > 0) for (var r = 0; r < this.newAdPointInfoList.length; r++) {
                var i = this.newAdPointInfoList[r].icon_interval;
                if (i) {
                    n = parseInt(i) > 0 ? parseInt(i) : n;
                    break;
                }
            }
            tywx.AdManager.newIconTimer && (clearInterval(tywx.AdManager.newIconTimer), tywx.AdManager.newIconTimer = 0), 
            tywx.AdManager.newIconTimer = setInterval(tywx.AdManager.freshNewAdIconByTime, 1e3 * n);
        } catch (t) {
            console.error("Error: startFreshAdIcon==>" + JSON.stringify(t));
        }
    },
    onForeGround: function() {
        this.freshAdIconByTime(), this.freshAdBannerByTime(), this.freshNewAdIconByTime(), 
        this.startFreshAdIcon();
    },
    getConfigSignStr: function(t) {
        for (var e = Object.keys(t).sort(), n = "", r = 0; r < e.length; r++) {
            var i = e[r];
            "act" != i && "sign" != i && (n += i + "=" + t[i]);
        }
        return tywx.hex_md5("market.tuyoo.com-api-" + n + "-market.tuyoo-api") || "";
    },
    requestADInfo: function() {
        try {
            if (this._hasAD) return;
            if (!tywx.IsWechatPlatform()) return;
            this.retryCrossTimes--;
            var t = {}, e = new Date().getTime();
            t.act = "api.getCrossConfig", t.time = e, t.game_mark = tywx.SystemInfo.cloudId + "-" + tywx.SystemInfo.gameId;
            var n = this.getConfigSignStr(t), r = [];
            for (var i in t) r.push(i + "=" + t[i]);
            r.push("sign=" + n);
            var o = tywx.SystemInfo.shareManagerUrl + "?" + r.join("&"), a = this;
            wx.request({
                url: o,
                method: "GET",
                success: function(t) {
                    if (200 == t.statusCode) {
                        var e = t.data;
                        a.allAdInfoList = [], e.retmsg && (a.rawAdInfoList = e.retmsg, a.processIconConfigInfo()), 
                        a.retryCrossTimes = 3;
                    } else a.retryCrossTimes > 0 ? a.requestADInfo() : a.retryCrossTimes = 3;
                },
                fail: function(t) {
                    a.retryCrossTimes > 0 ? a.requestADInfo() : a.retryCrossTimes = 3;
                }
            });
        } catch (t) {
            tywx.LOGE("error:", "tywx.AdManager.requestADInfo——" + JSON.stringify(t));
        }
    },
    requestBannerInfo: function() {
        try {
            if (!tywx.IsWechatPlatform()) return;
            this.retryBannerTimes--;
            var t = {}, e = new Date().getTime();
            t.act = "api.getBannerConfig", t.time = e, t.game_mark = tywx.SystemInfo.cloudId + "-" + tywx.SystemInfo.gameId;
            var n = this.getConfigSignStr(t), r = [];
            for (var i in t) r.push(i + "=" + t[i]);
            r.push("sign=" + n);
            var o = tywx.SystemInfo.shareManagerUrl + "?" + r.join("&"), a = this;
            wx.request({
                url: o,
                method: "GET",
                success: function(t) {
                    if (200 == t.statusCode) {
                        var e = t.data;
                        a.allBannerInfoList = [], e.retmsg && (a.rawBannerInfoList = e.retmsg, a.processBannerConfigInfo()), 
                        a.retryBannerTimes = 3;
                    } else a.retryBannerTimes > 0 ? a.requestBannerInfo() : a.retryBannerTimes = 3;
                },
                fail: function(t) {
                    a.retryBannerTimes > 0 ? a.requestBannerInfo() : a.retryBannerTimes = 3;
                }
            });
        } catch (t) {
            tywx.LOGE("error:", "tywx.AdManager.requestADInfo——" + JSON.stringify(t));
        }
    },
    requestNewAdInfo: function() {
        try {
            if (this._hasAD) return;
            if (!tywx.IsWechatPlatform()) return;
            this.retryNewAdTimes--;
            var t = {}, e = new Date().getTime();
            t.act = "api.getCrossConfigNew", t.time = e, t.game_mark = tywx.SystemInfo.cloudId + "-" + tywx.SystemInfo.gameId;
            var n = this.getConfigSignStr(t), r = [];
            for (var i in t) r.push(i + "=" + t[i]);
            r.push("sign=" + n);
            var o = tywx.SystemInfo.shareManagerUrl + "?" + r.join("&"), a = this;
            wx.request({
                url: o,
                method: "GET",
                success: function(t) {
                    if (200 == t.statusCode) {
                        var e = t.data;
                        a.allNewAdInfoDict = {}, e.retmsg && (a.rawNewAdInfoDict = e.retmsg, a.processNewIconConfigInfo()), 
                        a.retryNewAdTimes = 3;
                    } else a.retryNewAdTimes > 0 ? a.requestNewAdInfo() : a.retryNewAdTimes = 3;
                },
                fail: function(t) {
                    a.retryNewAdTimes > 0 ? a.requestNewAdInfo() : a.retryNewAdTimes = 3;
                }
            });
        } catch (t) {
            tywx.LOGE("error:", "tywx.AdManager.requestADInfo——" + JSON.stringify(t));
        }
    },
    processRawConfigInfo: function() {
        this.processIconConfigInfo(), this.processBannerConfigInfo(), this.processNewIconConfigInfo();
    },
    processIconConfigInfo: function() {
        var t = this;
        this.allAdInfoList = [], void 0 != this.rawAdInfoList && tywx.UserInfo.userId && (this.rawAdInfoList.length > 0 && (t._hasAD = !0), 
        this.rawAdInfoList.forEach(function(e) {
            (void 0 == e.icon_weight || Math.floor(e.icon_weight) <= .1) && (e.icon_weight = 0);
            for (var n = !1, r = e.push_uids || [], i = 0, o = r.length; i < o; i++) if (tywx.UserInfo.userId.toString() == r[i]) {
                n = !0;
                break;
            }
            if (n) t.allAdInfoList.push(e); else {
                var a = e.push_users || [], s = a.length;
                if (0 == s) t.allAdInfoList.push(e); else for (var c = 0; c < s; c++) {
                    var d = tywx.UserInfo.userId.toString();
                    if (d.charAt(d.length - 1) == a[c]) {
                        t.allAdInfoList.push(e);
                        break;
                    }
                }
            }
        }), tywx.NotificationCenter.trigger(tywx.EventType.GET_ADMANAGER_ICON_INFO_SUCCESS));
    },
    processBannerConfigInfo: function() {
        var t = this;
        this.allBannerInfoList = [], void 0 != this.rawBannerInfoList && tywx.UserInfo.userId && (this.rawBannerInfoList.forEach(function(e) {
            (void 0 == e.icon_weight || Math.floor(e.icon_weight) <= .1) && (e.icon_weight = 0);
            for (var n = !1, r = e.push_uids || [], i = 0, o = r.length; i < o; i++) if (tywx.UserInfo.userId.toString() == r[i]) {
                n = !0;
                break;
            }
            if (n) t.allBannerInfoList.push(e); else {
                var a = e.push_users || [], s = a.length;
                if (0 == s) t.allBannerInfoList.push(e); else for (var c = 0; c < s; c++) {
                    var d = tywx.UserInfo.userId.toString();
                    if (d.charAt(d.length - 1) == a[c]) {
                        t.allBannerInfoList.push(e);
                        break;
                    }
                }
            }
        }), tywx.NotificationCenter.trigger(tywx.EventType.GET_ADMANAGER_BANNER_INFO_SUCCESS));
    },
    processNewIconConfigInfo: function() {
        var t = this;
        if (this.allNewAdInfoDict = {}, void 0 != this.rawNewAdInfoDict && tywx.UserInfo.userId) {
            for (var e = Object.keys(this.rawNewAdInfoDict), n = 0, r = e.length; n < r; n++) {
                var i = this.rawNewAdInfoDict[e[n]];
                t.allNewAdInfoDict[e[n]] = [], i.length > 0 && (t._hasAD = !0), 0 < i.length && i.forEach(function(r) {
                    (void 0 == r.icon_weight || Math.floor(r.icon_weight) <= .1) && (r.icon_weight = 0);
                    var i = !1, o = r.push_uids || [];
                    for (var a in o) if (tywx.UserInfo.userId.toString() == o[a]) {
                        i = !0;
                        break;
                    }
                    if (i) t.allNewAdInfoDict[e[n]].push(r); else {
                        var s = r.push_users || [], c = s.length;
                        if (0 == c) t.allNewAdInfoDict[e[n]].push(r); else for (a = 0; a < c; a++) {
                            var d = tywx.UserInfo.userId.toString();
                            if (d.charAt(d.length - 1) == s[a]) {
                                t.allNewAdInfoDict[e[n]].push(r);
                                break;
                            }
                        }
                    }
                });
            }
            tywx.NotificationCenter.trigger(tywx.EventType.GET_ADMANAGER_NEWICON_INFO_SUCCESS);
        }
    },
    init: function() {
        this.requestADInfo(), this.requestBannerInfo(), this.requestNewAdInfo();
    },
    _hasAD: !1,
    hasAd: function() {
        return this._hasAD;
    },
    click: function() {
        var t = this.adNodeList;
        if (t.length > 0) {
            var e = t[t.length - 1];
            if (e.onClickAdIconBtn(), e.currentAdInfo.icon_url) return "string" == typeof e.currentAdInfo.icon_url ? e.currentAdInfo.icon_url : e.currentAdInfo.icon_url[0];
        }
        return null;
    }
}, tywx.AdManager.adNodeClass.prototype = tywx.AdManager.adNodeObj;